package org.hy.persistence.mypage;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.hy.domain.mypage.MyInterestProblem;
import org.hy.domain.mypage.MyInterestProblemComment;


public interface MyInterestProblemMapper {
	/**
	 * 无评论，用于分享，特别是分享至小组。
	 * @param id
	 * @return
	 */
	MyInterestProblem findMyInterestProblemById(Integer id);
	
	MyInterestProblem findMyInterestProblemWithCommentsById(@Param("id") int id,@Param("offset")int offset,@Param("size")int size);
	
	MyInterestProblem findMyInterestProblemWithDefaultCommentsById(int id);
	
	List<MyInterestProblem> findMyInterestProblemsWithCommentsByUid(@Param("uid") int uid,@Param("offset")int offset,@Param("size")int size);
	
	List<MyInterestProblem> findMyInterestProblemsWithDefaultCommentsByUid(@Param("uid") int uid,@Param("offset")int offset,@Param("size")int size);
	
	List<MyInterestProblemComment> findCommentsWithMyInterestProblemByUid(@Param("uid") int uid,@Param("offset")int offset,@Param("size")int size);
	
	int updateMyInterestProblem(MyInterestProblem myInterestProblem);
	
	int insertMyInterestProblem(MyInterestProblem myInterestProblem);
	
	int deleteMyInterestProblem(Integer id);
	
	int countMyInterestProblem(Integer uid);
	
	int countMyInterestProblemComment(int refFeedId);
}
